﻿@{
    var libraryRef = Url.Action("Index", "Library");
    var expressionsRef = Url.Action("Index", "Expression");
    var howTos = Url.Action("Index", "HowTos");
}

<div class="jumbotron">
    <h1>Dynamic LINQ Documentation</h1>
    <p class="lead">This is a living branch of the Microsoft Dyamic LINQ library. It allows developers to construct LINQ queries using <strong>string expressions</strong> instead of lambda expressions.</p>
    <p>New to Dynamic LINQ?  Visit @Html.ActionLink("Getting Started", "GettingStarted", null, new { @class = "btn btn-success" })</p>
</div>

<div class="row">
    <div class="col-md-9">
        <p>Have you ever wanted to dynamically construct queryable LINQ expressions on objects that couldn't be determined at runtime? With Dynamic LINQ, you can.</p>
        @Html.FormatCodeBlock("using System.Linq.Dynamic.Core; //Import the Dynamic LINQ library\n\n//The standard way, which requires compile-time knowledge\n//of the data model\nvar result = myQuery\n    .Where(x => x.Field1 == \"SomeValue\")\n    .Select(x => new { x.Field1, x.Field2 });\n\n//The Dynamic LINQ way, which lets you do the same thing\n//without knowing the data model before hand\nvar result = myQuery\n    .Where(\"Field1=\\\"SomeValue\\\"\")\n    .Select(\"new (Field1, Field2)\");")
        <p>Now you can dynamically create strings that will create your LINQ expressions that works with any data source that supports IQueryable.</p>
        <p>Visit the @Html.ActionLink("Project Info", "Info") page for information on obtaining the library and accessing the source code.</p>
    </div>
    <div class="col-md-3">
        <div class="panel panel-info">
            <div class="panel-heading">
                Work in Progress
            </div>
            <div class="panel-body">
                <p>This documentation is a work in progress. It, along with this branch of the Dynamic LINQ library, is an open source project, and as such, is worked on during developers' free time.</p>
                <p>Please be patient while we continue to add more information and functionality to the project.</p>
            </div>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-md-4 text-center">
        <h2><a href="@libraryRef">Library</a></h2>
        <p>Documentation on the classes and interfaces defined in the Dynamic LINQ library, their methods, and their arguments. Includes examples and remarks.</p>
        <p><a class="btn btn-default" href="@libraryRef">Look at Library &raquo;</a></p>
    </div>
    <div class="col-md-4 text-center">
        <h2><a href="@expressionsRef">Expressions</a></h2>
        <p>Documentation on the expressions defined in the Dynamic LINQ library. Includes examples and remarks.</p>
        <p><a class="btn btn-default" href="@expressionsRef">Look at Expressions &raquo;</a></p>
    </div>
    <div class="col-md-4 text-center">
        <h2><a href="@howTos">How Tos</a></h2>
        <p>Various examples and how tos.</p>
        <p><a class="btn btn-default" href="@howTos">Look at How Tos &raquo;</a></p>
    </div>
</div>